

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   cz.java

package com.zelix;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JList;
import javax.swing.UIManager;

// Referenced classes of package com.zelix:
//            bz, u3, zz, g2

public class cz extends bz
{

    private boolean b;
    private static String z[];

    public cz(Object obj, boolean flag)
    {
        super(obj);
        b = flag;
    }

    public void a(Component component, JList jlist, Object obj, int i, boolean flag, boolean flag1)
    {
        boolean flag2 = g2.b;
        if(b)
        {
            Color color = component.getForeground();
            Color color1 = component.getBackground();
            Color color2 = jlist.getSelectionForeground();
            Color color3 = jlist.getSelectionBackground();
            Color color4 = UIManager.getColor(z[1]);
            if(color4 != null && (color4 instanceof Color) && (flag || zz.a(color, (Color)color4)) && (flag || zz.a(color1, (Color)color4)) && (!flag || zz.a(color2, (Color)color4)) && (!flag || zz.a(color3, (Color)color4)))
            {
                component.setForeground((Color)color4);
                return;
            }
            color4 = UIManager.getColor(z[0]);
            if(color4 != null && (color4 instanceof Color) && (flag || zz.a(color, (Color)color4)) && (flag || zz.a(color1, (Color)color4)) && (!flag || zz.a(color2, (Color)color4)) && (!flag || zz.a(color3, (Color)color4)))
            {
                component.setForeground((Color)color4);
                return;
            }
            Color color5 = null;
            if(!flag && (zz.a(color) || zz.b(color)) || flag && (zz.a(color2) || zz.b(color2)))
                color5 = Color.gray;
            else
            if(flag)
                color5 = a(color2, color2);
            else
                color5 = a(color, color);
            if((flag || zz.a(color, color5)) && (flag || zz.a(color1, color5)) && (!flag || zz.a(color2, color5)) && (!flag || zz.a(color3, color5)))
            {
                component.setForeground(color5);
                return;
            }
            byte byte0 = 100;
            int j = 0;
            do
            {
label0:
                {
                    if(flag)
                    {
                        color5 = a(color5, color2);
                        if(!flag2)
                            break label0;
                    }
                    color5 = a(color5, color);
                }
                if((flag || zz.a(color, color5, byte0)) && (flag || zz.a(color1, color5, byte0)) && (!flag || zz.a(color2, color5, byte0)) && (!flag || zz.a(color3, color5, byte0)))
                {
                    component.setForeground(color5);
                    return;
                }
            } while(j++ < 3);
        }
    }

    public boolean equals(Object obj)
    {
        if(obj instanceof cz)
            return super.a.equals(((bz) ((cz)obj)).a);
        else
            return false;
    }

    public boolean b()
    {
        return b;
    }

    private Color a(Color color, Color color1)
    {
        if(!zz.b(color1))
            return color.brighter();
        else
            return color.darker();
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key =0x1c;
                    break;
                case 1:
                    key =20;
                    break;
                case 2:
                    key =19;
                    break;
                case 3:
                    key =14;
                    break;
                case 4:
                    key =32;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static
    {
        String as[];
        as = new String[2];
        as[0] = z("Qq}{\016x}`oBpqwHOnqt|Oizw".toCharArray());
        as[1] = z("^agzOr:wgS}v\177kDZ{akGn{f`D".toCharArray());
        z = as;
    }
}